/* Aarons Menu v2
This is just a last ditch relesase of my radio and menu that i had on my server, school started and all this crap so i wont be updating it too much but its fairly stable right now
Some of these functions wont work due to missing some lua files which ill probably include in the svn, they may need some editing tho to get working
*/
aaronsmenuversion = "Aaron's Menu - Version 2"
aaronsmenushortversion = "A-Menu v2"
local firstruncheck = 0
chat.AddText(Color(255,0,0,255), "Say !amenu To Access The Menu\nOr bind a key to +aaronsmenu to access the menu.\nExample \"bind  t  +aaronsmenu\" in console.\nReplace t with the key you want to use")
timer.Create( "nag_timer", 600, 0, function()
	LocalPlayer():ChatPrint("Say !amenu or Bind a key to +aaronsmenu to access the menu.\nExample \"bind  t  +aaronsmenu\" in console.\nReplace t with the key you want to use")
end )
local pan
local function showPanel()
	if firstruncheck == 0 then
		panel = vgui.Create( "DFrame" )
		panel:SetPos( 100, 60)
		panel:SetSize(800, 600)
		panel:SetTitle( aaronsmenuversion )
		panel:SetVisible( true )
		panel:SetDraggable( true )
		panel:ShowCloseButton( false )
		panel:SetSizable(true)
		panel:MakePopup()
		pan = panel
		local w = panel:GetWide()
		local h =  panel:GetTall()
		local closebutton = vgui.Create( "DImageButton", panel ) 
		closebutton:SetPos( 780, 5 )
		closebutton:SetImage( "silkicons/cross.vtf" )
		closebutton:SizeToContents()
		closebutton.DoClick = function()
			LocalPlayer():ConCommand("-aaronsmenu")
		end
		local PropertySheet = vgui.Create( "DPropertySheet" )
		PropertySheet:SetParent( panel )
		PropertySheet:SetPos( 5, 30 )
		PropertySheet:SetSize( w-10, h-35 ) 
		--------------------------Begin Radio Tab----------------------------------
		radiourl = [[<html>
					<body><font size="1" face="Verdana"><center>
					<b>Welcome</b><br>
					This Is Aarons GarrysMod Radio<br>
					You can load your custom url's by pressing the "load custom url" button below <br>
					Make sure you dont put the http:// or www. tho or else it wont work<br>
					Or you can load one of our fine selection of stations above :D <br>
					<font size="1" face="Verdana"></center>
					</body>
					</html>
					]]
		radiolastsaidsong = 0
		timer.Create("saysongtimer", 1, 0, function()
			radiolastsaidsong = radiolastsaidsong - 1
			if 
				radiolastsaidsong < 0
				then radiolastsaidsong = 0
				end
		end )
		local RADIO = vgui.Create( "DPanel", PropertySheet )
		RADIO:SetSize( w-20, h-45 )
		RADIO.Paint = function()
			surface.SetDrawColor( 0, 0, 0, 0 )
			surface.DrawRect( 0, 0, RADIO:GetWide(), RADIO:GetTall() )
		end
		radiolist = vgui.Create("DListView")
		radiolist:SetParent(RADIO)
		radiolist:SetPos(1, 1)
		radiolist:SetSize(775, 430)
		radiolist:SetMultiSelect(false)
		radiolist:SetSortable(true)
		local lstRadioTitle = radiolist:AddColumn("Title")
		local lstRadioURL = radiolist:AddColumn("URL")
		local lstRadioGenre = radiolist:AddColumn("Genre")
		local lstRadioType = radiolist:AddColumn("Type")
		radiolist:SortByColumn( 1 )
		lstRadioTitle:SetWide( 100 )
		lstRadioURL:SetWide( 300 )
		lstRadioGenre:SetWide( 15 )
		lstRadioType:SetWide( 1 )
		radiopage = vgui.Create( "HTML" , RADIO);
		radiopage:SetPos(0,445);
		radiopage:SetSize(775,255);
		radiopage:SetVisible(true);
		radiopage:SetHTML( radiourl );
		radiopage:Refresh(true);
		radiopage:StartAnimate(100)
		radiolist.OnRowSelected = function()
			radioselect = DermaMenu()
			radioselect:AddOption("Load This For Me Please", function()
				panel:SetTitle( aaronsmenushortversion.." - Currently Listining To: Title: "..radiosongTitle..
				"  URL: "..radiosongURL.."  Genre: "..radiosongGenre )
				radiourl = [[<center>
							<OBJECT ID="MediaPlayer" WIDTH="750" HEIGHT="44" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
							STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
							<PARAM NAME="FileName" VALUE="http://]]..radiosongURL..[[">
							<PARAM name="autostart" VALUE="true">
							<PARAM name="ShowControls" VALUE="true">
							<param name="ShowStatusBar" value="false">
							<PARAM name="ShowDisplay" VALUE="false">
							</OBJECT>
							</center>]]
				radiopage:SetHTML( radiourl );
				myradiotype = "aaron"
				print("\n\nCurrently Selected Song: \nTitle: "..radiosongTitle.."\nURL: "..radiosongURL.."\nGenre: "..radiosongGenre.."\nType: "..radiosongType.."\n\n")
				if radiolastsaidsong <= 0 then
					radiolastsaidsong = 30
					LocalPlayer():ConCommand("say \"/me Is Currently Listening To (Aarons Radio) "..radiosongTitle.."\"")
				else
					LocalPlayer():ChatPrint("Please Wait "..radiolastsaidsong.." Seconds Before Announcing Your Song")
				end
			end )
			radioselect:AddOption("Load This For Me Please - Dont Announce Tho", function()
				panel:SetTitle( aaronsmenushortversion.." - Currently Listining To: Title: "..radiosongTitle..
				"  URL: "..radiosongURL.."  Genre: "..radiosongGenre )
				radiourl = [[<center>
							<OBJECT ID="MediaPlayer" WIDTH="750" HEIGHT="44" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
							STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
							<PARAM NAME="FileName" VALUE="http://]]..radiosongURL..[[">
							<PARAM name="autostart" VALUE="true">
							<PARAM name="ShowControls" VALUE="true">
							<param name="ShowStatusBar" value="false">
							<PARAM name="ShowDisplay" VALUE="false">
							</OBJECT>
							</center>]]
				radiopage:SetHTML( radiourl );
				myradiotype = "aaron"
				print("\n\nCurrently Selected Song: \nTitle: "..radiosongTitle.."\nURL: "..radiosongURL.."\nGenre: "..radiosongGenre.."\nType: "..radiosongType.."\n\n")
			end )
			radioselect:Open()
		radiosongTitle = radiolist:GetLine(radiolist:GetSelectedLine()):GetValue(1)
		radiosongURL = radiolist:GetLine(radiolist:GetSelectedLine()):GetValue(2)
		radiosongGenre = radiolist:GetLine(radiolist:GetSelectedLine()):GetValue(3)
		radiosongType = radiolist:GetLine(radiolist:GetSelectedLine()):GetValue(4)
		end
		radiostop = vgui.Create( "DButton", RADIO )
		radiostop:SetParent( RADIO )
		radiostop:SetSize(RADIO:GetWide()-500, 15)
		radiostop:SetPos( 490,432 )
		radiostop:SetText( "Refresh The Radio" )
		radiostop.DoClick = function( button )
			LocalPlayer():ConCommand("aaronsmenu_reloadaaron")
		end
		radiostop = vgui.Create( "DButton", RADIO )
		radiostop:SetParent( RADIO )
		radiostop:SetSize(RADIO:GetWide()-532, 15)
		radiostop:SetPos( 248,432 )
		radiostop:SetText( "Turn Off The Radio" )
		radiostop.DoClick = function( button )
			radiourl = [[<center>Radio Stopped</center>]]
			radiopage:SetHTML( radiourl );
			panel:SetTitle( aaronsmenuversion )
		end
		radioload = vgui.Create( "DButton", RADIO )
		radioload:SetParent( RADIO )
		radioload:SetSize(RADIO:GetWide()-532, 15)
		radioload:SetPos( 1,432 )
		radioload:SetText( "Load Custom URL" )
		radioload.DoClick = function( button )
			local customradio = vgui.Create( "DFrame" )
			customradio:SetPos( 250,250 )
			customradio:SetSize( 500, 50 )
			customradio:SetTitle( "URL Link: (dont put the http:// or www. tho)" )
			customradio:ShowCloseButton( true )
			customradio:SetVisible( true )
			customradio:MakePopup()
			local customradiotext = vgui.Create( "DTextEntry", customradio )
			customradiotext:SetPos( 20,27 )
			customradiotext:SetTall( 20 )
			customradiotext:SetWide( 450 )
			customradiotext:SetEnterAllowed( true )
			customradiotext.OnEnter = function()
				customradiourl = customradiotext:GetValue()
				radiourl = [[<center>
							<OBJECT ID="MediaPlayer" WIDTH="750" HEIGHT="44" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
							STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
							<PARAM NAME="FileName" VALUE="http://]]..customradiourl..[[">
							<PARAM name="autostart" VALUE="true">
							<PARAM name="ShowControls" VALUE="true">
							<param name="ShowStatusBar" value="false">
							<PARAM name="ShowDisplay" VALUE="false">
							</OBJECT>
							</center>]]
				radiopage:SetHTML( radiourl );
				panel:SetTitle( aaronsmenushortversion.." - Currently Listining To: "..customradiourl)
				--print("Currently Selected Song: "..customradiourl)
				customradio:SetVisible( false )
				end
			end
		function reloadAaronsRadio()
		radiolist:Clear()
		//table.Empty(MusicList)
		//table.Empty(TempT)
		function FetchList ( SiteArgs, SiteSize )
			if SiteSize <= 0 then
				print("Site1 Failed To Load\tSize: "..SiteSize) --My ghetto attempt to load the list elsewhere if one site is down
				if !htmlFail then
					http.Get( "http://mcd2012.freesitespace.net/gmradio.html", "", FetchList )
					htmlFail=1
				elseif htmlFail==1 then
					print("Site2 Failed To Load")
					http.Get( "http://teacherweb.f-snet.com/gmradio.html", "", FetchList )
					htmlFail=2
				else
					print("Sites 1-3 Are Down, Radio Failed To Load")
				end
			end
			MusicList = {};
			for _, Line in pairs(string.Explode("\n", SiteArgs)) do
			if string.len(Line) > 5 then
				Info = string.Explode("\t", Line);
				TempT = {};
				TempT.Title = Info[1];
				TempT.URL = Info[2];
				TempT.Genre = Info[3];
				TempT.Type = Info[4];
				table.insert(MusicList, TempT)
				end
			end
			for k, v in pairs(MusicList) do
				radiolist:AddLine(v.Title,v.URL,v.Genre,v.Type)
			end
		end
		http.Get("http://aarons-gmodlua.googlecode.com/svn/trunk/gmradio/gmradio.html", "", FetchList);
		end
		----------------------End Radio Tab--------------------------
		----------------------Begin Pulsar Radio Tab / Pulsar radio dosent work anymore so i just comment it out.--------------------------
		----------------------They moved their radio to gmbass, so I would have to rewrite this to work which i dont have the time to do -------
		/*
		pulradiourl = [[<html>
					<body><font size="1" face="Verdana"><center>
					<b>Welcome</b><br>
					Imma Loadin Dis Off Of pulsareffect.com :D
					<font size="1" face="Verdana"></center>
					</body>
					</html>
					]]
		local PULRADIO = vgui.Create( "DPanel", PropertySheet )
		PULRADIO:SetSize( w-20, h-45 )
		PULRADIO.Paint = function()
			surface.SetDrawColor( 0, 0, 0, 0 )
			surface.DrawRect( 0, 0, PULRADIO:GetWide(), PULRADIO:GetTall() )
		end
		pulradiolist = vgui.Create("DListView")
		pulradiolist:SetParent(PULRADIO)
		pulradiolist:SetPos(1, 1)
		pulradiolist:SetSize(775, 520)
		pulradiolist:SetMultiSelect(false)
		pulradiolist:SetSortable(true)
		local lstPulArtist = pulradiolist:AddColumn("Artist")
		local lstPulTitle = pulradiolist:AddColumn("Title")
		local lstPulID = pulradiolist:AddColumn("Pulsar ID")
		pulradiolist:SortByColumn( 1 )
		lstPulArtist:SetWide( 300 )
		lstPulTitle:SetWide( 300 )
		lstPulID:SetWide( 1 )
		pulradiopage = vgui.Create( "HTML" , PULRADIO);
		pulradiopage:SetPos(0,600);
		pulradiopage:SetSize(775,0);
		pulradiopage:SetVisible(true);
		pulradiopage:SetHTML( radiourl );
		pulradiopage:Refresh(true);
		pulradiolist.OnRowSelected = function()
			pulradioselect = DermaMenu()
			pulradioselect:AddOption("Load This For Me Please", function()
				panel:SetTitle( aaronsmenushortversion.." - Currently Listining To:  Title: "..pulradiosongTitle..
				"  Artist: "..pulradiosongArtist)
				pulradiourl = [[<iframe src ="http://www.pulsareffect.com/jukebox/fetch.php?id=]]..pulradiosongID..[[" width="100%" height="%100"></iframe>]]
				pulradiopage:SetHTML( pulradiourl );
				myradiotype = "pulsar"
				print("\n\nCurrently Selected Song: \nTitle: "..pulradiosongTitle.."\nArtist: "..pulradiosongArtist.."\n\n")
				if radiolastsaidsong <= 0 then
					radiolastsaidsong = 30
					LocalPlayer():ConCommand("say \"/me Is Currently Listening To (Pulsar Radio) "..pulradiosongTitle.."\"")
				else
					LocalPlayer():ChatPrint("Please Wait "..radiolastsaidsong.." Seconds Before Announcing Your Song")
				end
			end )
			pulradioselect:AddOption("Load This For Me Please - Dont Announce Tho", function()
				panel:SetTitle( aaronsmenushortversion.." - Currently Listining To:  Title: "..pulradiosongTitle..
				"      Artist: "..pulradiosongArtist)
				pulradiourl = [[<iframe src ="http://www.pulsareffect.com/jukebox/fetch.php?id=]]..pulradiosongID..[[" width="100%" height="%100"></iframe>]]
				pulradiopage:SetHTML( pulradiourl );
				myradiotype = "pulsar"
				print("\n\nCurrently Selected Song: \nTitle: "..pulradiosongTitle.."\nArtist: "..pulradiosongArtist.."\n\n")
			end )
			pulradioselect:Open()
		pulradiosongID = pulradiolist:GetLine(pulradiolist:GetSelectedLine()):GetValue(3)
		pulradiosongArtist = pulradiolist:GetLine(pulradiolist:GetSelectedLine()):GetValue(1)
		pulradiosongTitle = pulradiolist:GetLine(pulradiolist:GetSelectedLine()):GetValue(2)
		end
		pulradiostop = vgui.Create( "DButton", PULRADIO )
		pulradiostop:SetParent( PULRADIO )
		pulradiostop:SetSize(390, 15)
		pulradiostop:SetPos( 370,520 )
		pulradiostop:SetText( "Stop This Song" )
		pulradiostop.DoClick = function( button )
			pulradiourl = [[<center>Radio Stopped</center>]]
			pulradiopage:SetHTML( pulradiourl );
			panel:SetTitle( aaronsmenuversion )
		end
		pulradioload = vgui.Create( "DButton", PULRADIO )
		pulradioload:SetParent( PULRADIO )
		pulradioload:SetSize(370, 15)
		pulradioload:SetPos( 1,520 )
		pulradioload:SetText( "Load Custom URL" )
		pulradioload.DoClick = function( button )
			local pulcustomradio = vgui.Create( "DFrame" )
			pulcustomradio:SetPos( 250,250 )
			pulcustomradio:SetSize( 500, 50 )
			pulcustomradio:SetTitle( "URL Link: (dont put the http:// or www. tho)" )
			pulcustomradio:ShowCloseButton( true )
			pulcustomradio:SetVisible( true )
			pulcustomradio:MakePopup()
			local pulcustomradiotext = vgui.Create( "DTextEntry", pulcustomradio )
			pulcustomradiotext:SetPos( 20,27 )
			pulcustomradiotext:SetTall( 20 )
			pulcustomradiotext:SetWide( 450 )
			pulcustomradiotext:SetEnterAllowed( true )
			pulcustomradiotext.OnEnter = function()
				pulcustomradiourl = pulcustomradiotext:GetValue()
				pulradiourl = [[<iframe src ="http://]]..pulcustomradiourl..[[" width="100%" height="%100"></iframe>]]
				pulradiopage:SetHTML( pulradiourl );
				panel:SetTitle( aaronsmenushortversion.." - Currently Listining To: "..pulcustomradiourl)
				print("\n\nCurrently Selected Song: "..pulcustomradiourl.."\n\n")
				pulcustomradio:SetVisible( false )
				end
			end
		pulradiostop = vgui.Create( "DButton", PULRADIO )
		pulradiostop:SetParent( PULRADIO )
		pulradiostop:SetSize(16, 15)
		pulradiostop:SetPos( 760,520 )
		pulradiostop:SetText( " " )
		pulradiostop.DoClick = function( button )
			print("\nLUL YOU FOUND DA SEKRET BTN    :D")
		end
		function pulFetchList ( pulSiteArgs )
			pulMusicList = {};
			for _, Line in pairs(string.Explode("\n", pulSiteArgs)) do
			if string.len(Line) > 5 then
				pulInfo = string.Explode("\t", Line);
				pulTempT = {};
				pulTempT.ID = pulInfo[1];
				pulTempT.Artist = pulInfo[2];
				pulTempT.Title = pulInfo[3];
				table.insert(pulMusicList, pulTempT)
				end
			end
			for k, v in pairs(pulMusicList) do
				pulradiolist:AddLine(v.Artist,v.Title,v.ID)
			end
		end
		http.Get('http://www.pulsareffect.com/jukebox/list.html', '', pulFetchList);
		*/
		----------------------End Pulsar Radio Tab--------------------------
		-----------------------Begin Admin Tab---------------------
		local ADMIN = vgui.Create( "DPanel", PropertySheet )
		ADMIN:SetSize( w-20, h-45 )
		ADMIN.Paint = function()
			surface.SetDrawColor( 0, 0, 0, 0 )
			surface.DrawRect( 0, 0, ADMIN:GetWide(), ADMIN:GetTall() )
		end
		
		local btn1 = vgui.Create( "DButton", ADMIN )
		btn1:SetParent( ADMIN )
		btn1:SetSize(100, 30)
		btn1:SetPos( 1,10 )
		btn1:SetText( "Global God Off" )
		btn1.DoClick = function( button )
			LocalPlayer():ConCommand("ulx_cvar sbox_godmode 0");
		end
		local btn2 = vgui.Create( "DButton", ADMIN )
		btn2:SetParent( ADMIN )
		btn2:SetSize(100, 30)
		btn2:SetPos( 100,10 )
		btn2:SetText( "Global God On" )
		btn2.DoClick = function( button )
			LocalPlayer():ConCommand("ulx_cvar sbox_godmode 1");
		end
		
			local btn3 = vgui.Create( "DButton", ADMIN )
		btn3:SetParent( ADMIN )
		btn3:SetSize(100, 30)
		btn3:SetPos( 1,35 )
		btn3:SetText( "PvP Damage On" )
		btn3.DoClick = function( button )
			LocalPlayer():ConCommand("ulx_cvar sbox_plpldamage 0");
		end
		local btn4 = vgui.Create( "DButton", ADMIN )
		btn4:SetParent( ADMIN )
		btn4:SetSize(100, 30)
		btn4:SetPos( 100,35 )
		btn4:SetText( "PvP Damage Off" )
		btn4.DoClick = function( button )
			LocalPlayer():ConCommand("ulx_cvar sbox_plpldamage 1");
		end
		
		local adminweatherbtn = vgui.Create("DButton")
		adminweatherbtn:SetParent( ADMIN )
		adminweatherbtn:SetText( "Weather Menu >" )
		adminweatherbtn:SetPos(1, 60)
		adminweatherbtn:SetSize( 200, 30 )
		adminweatherbtn.DoClick = function ( btn )
			local adminweatherbtnoptions = DermaMenu()
			adminweatherbtnoptions:AddOption("Sunny (Normal)", function() 
				LocalPlayer():ConCommand("weathertype sunny"); end )
			adminweatherbtnoptions:AddOption("Cloudy", function() 
				LocalPlayer():ConCommand("weathertype cloudy"); end )
			adminweatherbtnoptions:AddOption("Rain", function() 
				LocalPlayer():ConCommand("weathertype rain"); end )
			adminweatherbtnoptions:AddOption("Sunny Rain", function() 
				LocalPlayer():ConCommand("weathertype sunnyrain"); end )
			adminweatherbtnoptions:AddOption("Storm", function() 
				LocalPlayer():ConCommand("weathertype storm"); end )
			adminweatherbtnoptions:AddOption("Dark", function() 
				LocalPlayer():ConCommand("weathertype dark"); end )
			adminweatherbtnoptions:AddOption("Dark Rain", function() 
				LocalPlayer():ConCommand("weathertype darkrain"); end )
			adminweatherbtnoptions:Open()
		end
		------------------End Admin Tab-----------------------
		------------------Begin User Tab---------------------
		local USERTAB = vgui.Create( "DPanel", PropertySheet )
		USERTAB:SetSize( w-20, h-45 )
		USERTAB.Paint = function()
			surface.SetDrawColor( 0, 0, 0, 0 )
			surface.DrawRect( 0, 0, USERTAB:GetWide(), USERTAB:GetTall() )
		end
		
		local btn10 = vgui.Create( "DButton", USERTAB )
		btn10:SetParent( USERTAB )
		btn10:SetSize(100, 30)
		btn10:SetPos( 10,10 )
		btn10:SetText( "ClearDecals (Blood)" )
		btn10.DoClick = function( button )
			LocalPlayer():ConCommand("r_cleardecals");
		end
			
		local btn11 = vgui.Create( "DButton", USERTAB )
		btn11:SetParent( USERTAB )
		btn11:SetSize(100, 30)
		btn11:SetPos( 110,10 )
		btn11:SetText( "StopSounds (STFU)" )
		btn11.DoClick = function( button )
			LocalPlayer():ConCommand("stopsounds");
		end
		
		local btn12 = vgui.Create( "DButton", USERTAB )
		btn12:SetParent( USERTAB )
		btn12:SetSize(100, 30)
		btn12:SetPos( 10, 40 )
		btn12:SetText( "Ragdoll Me" )
		btn12.DoClick = function( button )
			LocalPlayer():ConCommand("ulx ragdollme");
		end
		
		local btn13 = vgui.Create( "DButton", USERTAB )
		btn13:SetParent( USERTAB )
		btn13:SetSize(100, 30)
		btn13:SetPos( 110, 40 )
		btn13:SetText( "UnRagdoll Me" )
		btn13.DoClick = function( button )
			LocalPlayer():ConCommand("ulx unragdollme");
		end
		
		local btn14 = vgui.Create( "DButton", USERTAB )
		btn14:SetParent( USERTAB )
		btn14:SetSize(200, 30)
		btn14:SetPos( 10, 70 )
		btn14:SetText( "Teleport Me To My Aim" )
		btn14.DoClick = function( button )
			LocalPlayer():ConCommand("ulx teleportme");
		end
		
		local btn15 = vgui.Create( "DButton", USERTAB )
		btn15:SetParent( USERTAB )
		btn15:SetSize(200, 30)
		btn15:SetPos( 10, 100 )
		btn15:SetText( "Drop My Current Weapon" )
		btn15.DoClick = function( button )
			LocalPlayer():ConCommand("dropmyweapon");
		end
		
		local btn16 = vgui.Create( "DButton", USERTAB )
		btn16:SetParent( USERTAB )
		btn16:SetSize(200, 30)
		btn16:SetPos( 10, 130 )
		btn16:SetText( "Toggle Drop My Weapons" )
		btn16.DoClick = function( button )
			LocalPlayer():ConCommand("dropmyweapons_tgl");
		end
		
		local btn17 = vgui.Create( "DButton", USERTAB )
		btn17:SetParent( USERTAB )
		btn17:SetSize(200, 30)
		btn17:SetPos( 10, 160 )
		btn17:SetText( "Set My SpawnPoint" )
		btn17.DoClick = function( button )
			LocalPlayer():ConCommand("setspawnpoint");
		end
		
		local slider10 = vgui.Create( "DNumSlider", DermaPanel )
		slider10:SetParent( USERTAB )
		slider10:SetPos( 1,500 )
		slider10:SetSize( 150, 100 )
		slider10:SetText( "ClientSide Rain Density" )
		slider10:SetMin( 0 )
		slider10:SetMax( 15 )
		slider10:SetDecimals( 0 )
		slider10:SetConVar( "cs_raindensity" )
	-------------------End User Tab----------------------------
	-------------------Begin Playertab-------------------------
		local PLAYER = vgui.Create("DListView")
		PLAYER:SetParent(PLAYER)
		PLAYER:SetPos(25, 80)
		PLAYER:SetSize( PLAYER:GetWide() - 20, PLAYER:GetTall()-80 )
		PLAYER:SetMultiSelect(false)
		PLAYER:SetSortable(true)
		local lstName = PLAYER:AddColumn("Name")
		local lstAdmin = PLAYER:AddColumn("Admin?")
		local lstHP = PLAYER:AddColumn("Health")
		local lstArm = PLAYER:AddColumn("Armor")
		local lstWep = PLAYER:AddColumn("Weapon")
		local lstKils = PLAYER:AddColumn("Frags")
		local lstAlv = PLAYER:AddColumn("Alive?")
		local lstVeh = PLAYER:AddColumn("In Vehicle?")
		local lstDis = PLAYER:AddColumn("Distance")
		PLAYER:SortByColumn( 6 )
		lstName:SetWide( 200 )
		lstAdmin:SetWide( 5 )
		lstHP:SetWide( 2 )
		lstArm:SetWide( 2 )
		lstWep:SetWide( 150 )
		lstKils:SetWide( 5 )
		lstAlv:SetWide( 5 )
		lstVeh:SetWide( 8 )
		lstDis:SetWide( 5 )
		function reloadplylist()
		PLAYER:Clear()
		for k,v in pairs(player.GetAll()) do
			plypos = v:GetPos()
			if v:GetActiveWeapon():IsValid() then plyweap = v:GetActiveWeapon():GetPrintName() else plyweap = "N/A - Dead/Stripped/Ragdolled" end
			PLAYER:AddLine(v:Nick(),v:IsAdmin(),v:Health(),v:Armor(),plyweap,v:Frags(),v:Alive(),
			v:InVehicle(),tostring(math.floor(plypos:Distance(LocalPlayer():GetPos()))))
			PLAYER.OnRowSelected = function()
				local PLAYERULX = DermaMenu()
				PLAYERULX:AddOption("SSlay", function()
					LocalPlayer():ConCommand("ulx sslay \""..targetply.."\""); end )
				PLAYERULX:AddOption("Rocket", function()
					LocalPlayer():ConCommand("ulx rocket \""..targetply.."\""); end )
				PLAYERULX:AddOption("Explode", function()
					LocalPlayer():ConCommand("ulx explode \""..targetply.."\"9999 250"); end )
				PLAYERULX:AddOption("Whip", function()
					local cexpanel = vgui.Create( "DFrame" )
					cexpanel:SetPos( 250,250 )
					cexpanel:SetSize( 500, 50 )
					cexpanel:SetTitle( "Whip "..targetply.." For X times With X Damage" )
					cexpanel:ShowCloseButton( true )
					cexpanel:SetVisible( true )
					cexpanel:MakePopup()
					local cextext = vgui.Create( "DTextEntry", cexpanel )
					cextext:SetPos( 20,27 )
					cextext:SetTall( 20 )
					cextext:SetWide( 450 )
					cextext:SetEnterAllowed( true )
					cextext.OnEnter = function()
						cexargs = cextext:GetValue()
						cexpanel:SetVisible( false )
						LocalPlayer():ConCommand("ulx whip \""..targetply.."\" "..cexargs);
						end
					end )
				PLAYERULX:AddOption("Kick", function()
					local kickpanel = vgui.Create( "DFrame" )
					kickpanel:SetPos( 250,250 )
					kickpanel:SetSize( 500, 50 )
					kickpanel:SetTitle( "Kick Reason For: "..targetply )
					kickpanel:ShowCloseButton( true )
					kickpanel:SetVisible( true )
					kickpanel:MakePopup()
					local kicktext = vgui.Create( "DTextEntry", kickpanel )
					kicktext:SetPos( 20,27 )
					kicktext:SetTall( 20 )
					kicktext:SetWide( 450 )
					kicktext:SetEnterAllowed( true )
					kicktext.OnEnter = function()
						kickreason = kicktext:GetValue()
						kickpanel:SetVisible( false )
						LocalPlayer():ConCommand("ulx kick \""..targetply.."\" \""..kickreason.."\"");
						end
					end )
				PLAYERULX:AddOption("Ban", function()
					local banpanel = vgui.Create( "DFrame" )
					banpanel:SetPos( 250,250 )
					banpanel:SetSize( 500, 50 )
					banpanel:SetTitle( "Ban Time For: "..targetply )
					banpanel:ShowCloseButton( true )
					banpanel:SetVisible( true )
					banpanel:MakePopup()
					local bantext = vgui.Create( "DTextEntry", banpanel )
					bantext:SetPos( 20,27 )
					bantext:SetTall( 20 )
					bantext:SetWide( 450 )
					bantext:SetEnterAllowed( true )
					bantext.OnEnter = function()
						bantime = bantext:GetValue()
						banpanel:SetVisible( false )
						local banpanel2 = vgui.Create( "DFrame" )
						banpanel2:SetPos( 280,280 )
						banpanel2:SetSize( 500, 50 )
						banpanel2:SetTitle( "Ban Reason For: "..targetply )
						banpanel2:ShowCloseButton( true )
						banpanel2:SetVisible( true )
						banpanel2:MakePopup()
						local bantext2 = vgui.Create( "DTextEntry", banpanel2 )
						bantext2:SetPos( 20,27 )
						bantext2:SetTall( 20 )
						bantext2:SetWide( 450 )
						bantext2:SetEnterAllowed( true )
						bantext2.OnEnter = function()
							banreason = bantext2:GetValue()
							banpanel:SetVisible( false )
							banpanel2:SetVisible( false )
							LocalPlayer():ConCommand("ulx ban \""..targetply.."\" "..bantime.." \""..banreason.."\"");
							end
					end
				end )
				PLAYERULX:Open()
				local selected = PLAYER:GetLine(PLAYER:GetSelectedLine()):GetValue(1)
				for k,v in pairs(player.GetAll()) do
						//if v == LocalPlayer() then targetply = nil,kickpanel:SetVisible( false ),banpanel:SetVisible( false )-- uncomment if you dont want to be able to attack yourself
						//if v != LocalPlayer() then 
						if v:Nick() == selected then
						targetply = v:Nick()
						print("\nTarget is: ".. targetply .."\n\n")
						end
					//end	
				end
			end
		end
		end
	---------------------End Player Tab---------------------

		PropertySheet:AddSheet( "Aaron's Radio", RADIO, "gui/silkicons/sound", false, false, "Listen To Some Music" )
		--PropertySheet:AddSheet( "MP3 Stream (Pulsar)", PULRADIO, "gui/silkicons/sound", false, false, "Listen To Some Music" )
		PropertySheet:AddSheet( "Player List/Info", PLAYER, "gui/silkicons/group", false, false, "Player Stats/Info And Punishment Options For Admins" )
		PropertySheet:AddSheet( "User Menu/Commands", USERTAB, "gui/silkicons/user", false, false, "Simple User Commands" )
		PropertySheet:AddSheet( "Admin Options", ADMIN, "gui/silkicons/shield", false, false, "Settings And Stuff For Admins" ) 
		concommand.Add("aaronsmenu_reloadaaron", reloadAaronsRadio)
		reloadplylist()
		reloadAaronsRadio()
		firstruncheck = 1
	else
		gui.SetMousePos(mouseExitPosX, mouseExitPosY)
		panel:SetVisible(true)
		radiopage:StartAnimate(100)
		gui.EnableScreenClicker(true)
		reloadplylist()
	end
end
local function hidePanel()
	mouseExitPosX, mouseExitPosY = gui.MousePos()
	radiopage:StopAnimate()
	if panel:IsVisible() then
		panel:SetVisible(false)
	end
	gui.EnableScreenClicker(false)
end
concommand.Add("+aaronsmenu", showPanel)
concommand.Add("-aaronsmenu", hidePanel)
concommand.Add("aaronsmenu_reloadaaron", reloadAaronsRadio)

function plychat( player, text, teamchat, alive )--You can comment this out if you dont want to say what your listining to.
	myname = string.lower(LocalPlayer():Nick())
	bannedchars = {"<",">","(",")","[","]","{","}",".",",","/","\\",}
	for k, v in pairs(bannedchars) do
		myname = string.Replace(myname,v," ")
	end
	chattext = string.Explode(" ", text)
	chatsaidcmd = string.lower(chattext[1])
	if chatsaidcmd == "!amenu" || "!radio" || "!setspawn" then
		if !chattext[2] && chatsaidcmd == "!amenu" && player == LocalPlayer() then LocalPlayer():ConCommand("+aaronsmenu") end
		if !chattext[2] && chatsaidcmd == "!setspawn" && player == LocalPlayer() then LocalPlayer():ConCommand("setspawnpoint") end
		if chattext[2] && chatsaidcmd == "!radio" then
			chatsaidply = string.lower(chattext[2])
			plysuccess = string.find(myname, chatsaidply)
			if plysuccess then
				if myradiotype == "aaron" then
					if radiolastsaidsong <= 0 then
						radiolastsaidsong = 30
						LocalPlayer():ConCommand("say \"/me Is Currently Listening To (Aarons Radio) "..radiosongTitle.."\"")
					end
				elseif myradiotype == "pulsar" then
					if radiolastsaidsong <= 0 then
						radiolastsaidsong = 30
						LocalPlayer():ConCommand("say \"/me Is Currently Listening To (Pulsar Radio) "..pulradiosongTitle.."\"")
					end
				else
					LocalPlayer():ConCommand("say \"/me Is Not Listining To Music\"")
				end
			end
		end
	end
end

hook.Add( "OnPlayerChat", "plychat", plychat);